<div id="filter-box">
    Filter based on: <%= select( "document", "name", @filter_hash) %>
    <%= text_field 'query', 'filter', :size => 24 %>    
<%= image_tag("spinner.gif",
              :align => 'absmiddle',
              :border=> 0,
              :id => "spinner",
              :style=>"display: none;" ) %>
           

<%= observe_field 'query_filter',  :frequency => 1,
         :update => 'table',
         :before => "Element.show('spinner')",
         :success => "Element.hide('spinner')",
         :url => {:action => 'new'},
         :with => "'search_col='+ escape($('document_name').value) + '&query=' + escape($('query_filter').value)"
         %>
</div>

<div id="table">
<%= render :partial => "documents_list" %>
</div>